The present invention relates to a digital to analog converter and, more particularly, to a converter and a method of conversion that accomplishes the conversion by duty cycle modulation.
In the design of interfaces for digital or microprocessor-based electronic circuits, it is often necessary to convert a binary number to an equivalent voltage or current. This is accomplished by a circuit commonly referred to as a digital to analog ("D/A") converter which divides a precision reference voltage into a ratio proportional to the binary number. The division is accomplished either by a ladder of precisely ratioed resistors or by duty cycle modulation. The present invention relates to a D/A converter using duty cycle modulation.
A circuit for this type of D/A conversion generates a wavetrain having a duty cycle proportional to the binary input and an amplitude equal to the reference voltage (V.sub.r). The duty cycle, D, is the ratio of time "on" to time "off" for one cycle of a wavetrain. A common approach to generating the wavetrain is to load the binary input into a counter. The output of the counter is held high while the counter counts down to zero. When the counter reaches zero, the output is set back to low until it is time for the cycle to be repeated. The cycle time or wavetrain period, T, is equal to the product of the number, 2.sup.n, and the period of a clock cycle, where n is the number of bits comprising the binary number. For example, a wavetrain for a three-bit D/A converter could be in one of eight forms, 2.sup.3, wherein the pulse width [("PW"), where PW.times.(T)(D)] ranges from 1/8 to 7/8 of the wavetrain period, T, and has an amplitude equal to the reference voltage (V.sub.r). Thus, for the binary number 011. The D/A converter provides a wavetrain having a duty cycle corresponding to the binary number, i.e., a duty cycle of D=3/8. The wavetrain is applied to the input of a low pass filter which derives an average value. The average value of the wavetrain is equal to the product of its amplitude, the reference voltage (V.sub.r), and its duty cycle (D), in this case 3/8.
The low-pass filter can be, for example, a single-pole RC circuit. The problem with such a filter is that the time constant of the filter must be long relative to the wavetrain period (T) in order to reduce the output ripple to a value smaller than one least significant bit, lsb, i.e., a number equal to 1/2.sup.n, where n is the number of bits comprising the binary number. This requirement seriously limits the speed of response of the D/A converter. Furthermore, a D/A converter for larger binary numbers requires filter components having correspondingly larger values. As a result, the necessary filter components are too large in size for integrated circuit designs. For example, when the time constant of the filter is longer than the wavetrain period (T), the wave shape of the output will be triangular, rising during the high pulse time and falling during the low pulse time. The rising portion of the ripple, R, is defined as follows: EQU Equation 1: R=(V.sub.r -V.sub.0) (PW/.tau.)
where: EQU V.sub.r =reference voltage EQU V.sub.0 =output voltage EQU PW=pulse width of the waveform EQU .tau.=time constant of the filter
Since V.sub.0 =(V.sub.r) (D) and PW=(T) (D), the ripple percentage, R% (=R/V.sub.r), becomes: EQU Equation 2: R%=(1-D) (D)(T)/.tau.
Since the function (1-D) (D) has a maximum value of 0.25 when D is equal to 0.5 (i.e., a 50% duty cycle), the maximum ripple percentage, R% max, is equal to 0.25(T)/.tau.. As mentioned above, R% max must be less than one lsb or 1/2.sup.n. Substituting this value for R% max, the time constant of the filter can be defined as follows: EQU Equation 3: .tau.=0.25(T)2.sup.n
Assuming that the frequency, f, is equal to 2 MHz, the filter's time constant for a 3-bit digital number would be equal to 3 ms, which is an acceptable design value. However, the filter's time constant for a 14-bit word would be greater than 33 seconds, which is not acceptable.
Accordingly, there is a need for a D/A converter using duty cycle modulation and, more specifically, one that is capable of converting a large binary number to an analog signal while still using reasonably sized filter components that can be used in conjunction with the design of integrated circuits.